home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 November: Tool Chest / Dev.CD Nov 96 TC / Dev.CD Nov 96 TC.toast / Sample Code / Snippets / Processes / LaunchWithSize / LaunchWithSize ReadMe < prev    next >
Encoding:
Text File  |  1996-05-17  |  1.3 KB  |  28 lines  |  [TEXT/CWIE]

  1. /*
  2.  
  3. LaunchWithSize is a program to demonstrate how to patch the call the LaunchApplication function
  4. so that you can adjust the size of the memory partition that the application will be opened
  5. into.
  6.  
  7. LaunchWithSize does this by patching the call to Get1Resource (which is how LaunchApplication
  8. reads the SIZE resource of the application being launched), looking for a resource of type
  9. 'SIZE' and once it finds one, it replaces the old prefered memory value stored in the 'SIZE'
  10. resource with a value hard coded in LaunchWithSize.
  11.  
  12. You will want to increase its flexibility by calculating the size you want to set, but this
  13. is a simple sample showing how to do the patching.
  14.  
  15. This is useful primarly for multimedia developers who have applications on a CD where the SIZE
  16. resource cannot be changed.
  17.  
  18. LaunchFodder is an application that just calls MacsBug with the 'procinfo' dcmd to show what
  19. it's current memory partion is.  If you launch LaunchFodder by itself you should see the value
  20. 0x0000C800 reported as its size.  If you launch LaunchWithSize, which launches LaunchFodder
  21. after doing a runtime adjustment of LaunchFodder's SIZE resource you should see the value
  22. 0x00100000 reported as its size.
  23.  
  24. As always we welcome your comments and feedback.
  25.  
  26. Pete Gontier    gurgle@apple.com
  27. Mark Cookson    mcookson@apple.com
  28. */